<script setup lang="ts">
defineOptions({ inheritAttrs: false });

const props = defineProps<{
  icon?: string;
}>();
</script>

<template>
  <span
    v-if="props.icon?.startsWith('classname-')" v-bind="$attrs"
    class="sport-icon icon-default-sport"
    :class="[props.icon.replace('classname-', '')]"
  />
  <img v-else v-bind="$attrs" :src="$store.app.joinCdnPath(props.icon)">
</template>
